/*
 * Product.java
 *
 * Created on April 1, 2007, 2:47 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package model;

/**
 *
 * @author Alirio
 */
public class Product {
    
  private String  id;
  private String  description;
  private double stock;
  private double price;
  private double price1;
  private double price2;
  private double price3;
  private double price4;
  private double price5;
  private double price6;
  private double price7;
  private double price8;
  private double price9;
  private double price10;
  private String primaryUnit;
  private String alternativeUnit;
  private float conversionRate;
  private String warehouse;
  private String brand;
  private String target;
  private String requiredDate;
  
  /** Creates a new instance of Product */
  public Product() {
  }
  
  public Product(String id, String name) {
    this.id = id;
    this.description = name;
  }
  
  public boolean equals(Object other) {
    if (this==other) return true;
    if ( !(other instanceof Product) ) return false;
    final Product that = (Product) other;
    return this.id.equals( that.getId() );
  }
  
  public int hashCode() {
    return id.hashCode();
  }
  
  public double getPrice(int index) {
    switch (index) {
      case 1: return getPrice1();
      case 2: return getPrice2();
      case 3: return getPrice3();
      case 4: return getPrice4();
      case 5: return getPrice5();
      case 6: return getPrice6();
      case 7: return getPrice7();
      case 8: return getPrice8();
      case 9: return getPrice9();
      case 10: return getPrice10();
      default: return getPrice1();
    }
  }
  
  public String getId() {
    return id;
  }
  
  public void setId(String id) {
    this.id = id;
  }
  
  public String getDescription() {
    return description;
  }
  
  public void setDescription(String description) {
    this.description = description;
  }
  
  public double getStock() {
    return stock;
  }
  
  public void setStock(double stock) {
    this.stock = stock;
  }
  
  public double getPrice1() {
    return price1;
  }
  
  public void setPrice1(double price1) {
    this.price1 = price1;
  }
  
  public double getPrice2() {
    return price2;
  }
  
  public void setPrice2(double price2) {
    this.price2 = price2;
  }
  
  public double getPrice3() {
    return price3;
  }
  
  public void setPrice3(double price3) {
    this.price3 = price3;
  }
  
  public double getPrice4() {
    return price4;
  }
  
  public void setPrice4(double price4) {
    this.price4 = price4;
  }
  
  public double getPrice5() {
    return price5;
  }
  
  public void setPrice5(double price5) {
    this.price5 = price5;
  }
  
  public double getPrice6() {
    return price6;
  }
  
  public void setPrice6(double price6) {
    this.price6 = price6;
  }
  
  public double getPrice7() {
    return price7;
  }
  
  public void setPrice7(double price7) {
    this.price7 = price7;
  }
  
  public double getPrice8() {
    return price8;
  }
  
  public void setPrice8(double price8) {
    this.price8 = price8;
  }
  
  public double getPrice9() {
    return price9;
  }
  
  public void setPrice9(double price9) {
    this.price9 = price9;
  }
  
  public double getPrice10() {
    return price10;
  }
  
  public void setPrice10(double price10) {
    this.price10 = price10;
  }
  
  public String getPrimaryUnit() {
    return primaryUnit;
  }
  
  public void setPrimaryUnit(String primaryUnit) {
    this.primaryUnit = primaryUnit;
  }
  
  public String getAlternativeUnit() {
    return alternativeUnit;
  }
  
  public void setAlternativeUnit(String alternativeUnit) {
    this.alternativeUnit = alternativeUnit;
  }
  
  public float getConversionRate() {
    return conversionRate;
  }
  
  public void setConversionRate(float conversionRate) {
    this.conversionRate = conversionRate;
  }
  
  public String getWarehouse() {
    return warehouse;
  }
  
  public void setWarehouse(String warehouse) {
    this.warehouse = warehouse;
  }
  
  public double getPrice() {
    return price;
  }
  
  public void setPrice(double price) {
    this.price = price;
  }

  public String getBrand() {
    return brand;
  }

  public void setBrand(String brand) {
    this.brand = brand;
  }

  public String getTarget() {
    return target;
  }

  public void setTarget(String target) {
    this.target = target;
  }

    public String getRequiredDate() {
        return requiredDate;
    }

    public void setRequiredDate(String requiredDate) {
        this.requiredDate = requiredDate;
    }
  
}
